#include "main/utils.h"
using namespace std;

class Solution {
public:
    bool threeConsecutiveOdds(vector<int>& arr) {
      int count = 0;
      for (int i = 0; i < arr.size(); ++i) {
        if (arr[i] & 1) {
          ++count;
          if (count >= 3)
            return true;
        } else {
          count = 0;
        }
      }
      return false;
    }
};

int main() {
  vector<int> arr = {2, 6, 4, 1};
  vector<int> arr1 = {1, 2, 34, 3, 4, 5, 7, 23, 12};
  Solution su;
  cout << su.threeConsecutiveOdds(arr) << endl;
  cout << su.threeConsecutiveOdds(arr1) << endl;

  return 0;
}
